import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

import axios from "axios";
Vue.prototype.$axios = axios
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';

Vue.use(ElementUI);

//拦截器 配置请求的跟路径
axios.defaults.baseURL = 'http://132.145.94.78:8889/api/private/v1/'
axios.interceptors.request.use(config => {
  //console.log(config);
  config.headers.Authorization = window.localStorage.getItem('token')
  return config
})
Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
